<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page import="java.util.Calendar"%>
<script language="JavaScript" src="<%= request.getContextPath() + "/js/calendar6.js" %>"></script>

  <!--SECCION DE MENSAJES DE ERROR INFORMACION PRECAUCION Y CONFIRMACION -->
  <!--MENSAJES DE INFORMACION  -->

<logic:messagesPresent message="true"> 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgInfor" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
  <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgError" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgWarn" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
 
 <table title="Mensajes de aplicacion" align="center" >
  <tr>
    <td><html:messages id="msg" property="msgOk" message="true">
      <table border="0" cellpadding="0" cellspacing="0">
       <tr>
         <td bgcolor="#A8BDDD" class="titalert"></td>
         <td bgcolor="#A8BDDD" class="titalert" height="30"><bean:write name="msg"/></td>
       </tr>
      </table></html:messages> 
    </td>
  </tr>
 </table>
</logic:messagesPresent> 
 
 
<table width="100%"  border="0" cellspacing="0" cellpadding="0" widtd="100%">
  <!--TITULO DE LA OPCION  -->
  <tr align="left"> 
   <td height="25" colspan="12" align="center" class="titulosenblanco"> 
    <p>
     <STRONG>ASOCIAR USUARIO A APLICACION <bean:write name="applicationSelected" property="name" /></STRONG>
    </p>
    <p>&nbsp; </p>
   </td>
   </tr>
  
  <!--DEFINICION DEL FORM  -->
 <html:form  action="/admin/createApplicationUser.do"  method="post" name="frmCreateApplicationUser" type="com.cs.paoyer.administration.web.form.ApplicationUserForm">
  <input type="hidden" name="applicationCode" value='<bean:write name="applicationSelected" property="code"/>' />
  <tr align="left">
   <td height="25" colspan="12" class="titulosenblanco">   
		<table width="100%" border="0" cellspacing="3" cellpadding="3" class="titulosenrojo">
  
  <!--CAMPO 'USUARIO' DEL FORMULARIO DE INSERCION  -->
      <tr>
        <td width="28%">&nbsp;</td>
        <td width="23%" class="celdatabla"><strong>Usuario</strong> (*)&nbsp;&nbsp; 
        </td>
        <td width="46%"> 
           <html:select styleClass="form" property="userCode" style="width:215" > 
            <html:option value = "0" >Seleccionar Usuario</html:option>
            <html:options collection="users" property="userCode" labelProperty="userName" /> 
            </html:select>
        </td>
        <td width="3%">&nbsp;</td>
      </tr>
  <!--CAMPO 'VIGENCIA' DEL FORMULARIO DE INSERCION  -->
      <tr>
        <td width="28%">&nbsp;</td>
        <td width="23%" class="celdatabla"><strong>Vigencia</strong> (*)&nbsp;&nbsp; 
        </td>
        <td width="46%"> 
           <html:select styleClass="form" property="use" style="width:215" > 
            <html:option value = "" >Seleccionar un Valor</html:option>
            <html:option value = "S" >Si</html:option>
            <html:option value = "N" >No</html:option>
            </html:select>
        </td>
        <td width="3%">&nbsp;</td>
      </tr>
  <!--CAMPO 'DESDE VIGENCIA' DEL FORMULARIO DE INSERCION  -->

        <tr>
          <td width="28%">&nbsp;</td>
          <td class="celdatabla" width="23%"><strong>Desde</strong> &nbsp;&nbsp; 
          </td>
          <td width="46%">
            <input type="text" size= "40" class="form"  name="effectiveFrom" readonly="true" />
            <a href="javascript:effectiveFrom1.popup();">
              <img  src="<%= request.getContextPath() + "/images/cal.gif" %>" 
                width="16" height="16" border="0" alt="Click para seleccionar la fecha">
            </a>
          </td>
          <td width="3%">&nbsp;</td>
        </tr>
	  <!--CAMPO 'HASTA VIGENCIA' DEL FORMULARIO DE INSERCION  -->
        <tr>
          <td width="28%">&nbsp;</td>
          <td class="celdatabla" width="23%"><strong>Hasta</strong> &nbsp;&nbsp; 
          </td>
          <td width="46%"> 
            <input type="text" size= "40" class="form" readonly="true"   name="effectiveUntil" />
            <a href="javascript:effectiveUntil1.popup();">
              <img src="<%= request.getContextPath() + "/images/cal.gif" %>" 
                width="16" height="16" border="0" alt="Click para seleccionar la fecha">
            </a>
          </td>
          <td width="3%">&nbsp;</td>
        </tr>
	  <!--CAMPO 'DESCRIPCION' DEL FORMULARIO DE INSERCION  -->
        <tr>
          <td width="28%">&nbsp;</td>
          <td width="23%" valign="top" class="celdatabla"><strong>Descripcion</strong> 
            (*)&nbsp;&nbsp; 
          </td>
          <td width="46%"> <textarea  name="description" cols="35" rows="5" styleClass="form"></textarea>
          </td>
          <td width="3%">&nbsp;</td>
        </tr>
  <!--MENSAJE DE TEXTO FIJO DEL FORMULARIO DE INSERCION  -->
		  <tr> 
        <td class="celdatabla" colspan="3" align="center">&nbsp;Los campos marcados con (*) son obligatorios</td>
        <td width="3%">&nbsp;</td>
      </tr>
		  <tr> 
        <td colspan="4">&nbsp;</td>
		  </tr>
  <!--BOTON SUBMIT DEL FORMULARIO DE INSERCION  -->
		  <tr> 
        <td colspan="4" align="center">
          <html:image src='<%= request.getContextPath() + "/images/b_ingresar_b1.gif" %>' border="0" value='Guardar' title='Guardar' onclick='submit;' />
        </td>
		  </tr>
    </table>
   </td>
  </tr>  
 </html:form>  
</table>


  <!--CALENDARIO  -->
<script language="JavaScript">
                       
                        var effectiveFrom1 = new calendar1(document.forms['frmCreateApplicationUser'].elements['effectiveFrom'],"-",'<%=request.getContextPath()+"/js/"%>');
                        var effectiveUntil1 = new calendar1(document.forms['frmCreateApplicationUser'].elements['effectiveUntil'],"-",'<%=request.getContextPath()+"/js/"%>');
                      
                      </script>
<p>&nbsp;</p>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
     <td width="20" scope="col">&nbsp;</td>
     <td width="33" align="left" scope="col"><div align="center"><html:link page="/admin/findApplicationUser.do"><img src="<%= request.getContextPath() + "/images/b_atras.gif" %>" width="24" height="15" border="0"><br>
     <span class="celdaayd">Atras</span></html:link></div></td>
	 
     <td align="right" scope="col">&nbsp;</td>
     <td width="20" scope="col">&nbsp;</td>
  </tr>
</table>
